<?
$id += 0;
$tour = new Tour();
$tour->select($id);
if ($tour)
{
	if ($mod == 'description')	
	{
		echo $tour->getdescription();
	}
	else if ($mod == 'quy_trinh')
	{
		$cnt = 0;
		$locations = $tour->getAllLocations();
		foreach($locations as $location)
		{
			$cnt ++;
		?>
        	<div style='padding:5px 0;'>
            	<div style='font-weight:bold;color:#2e3192;padding:5px 0 10px;font-size:12px;'><?=$cnt?>. <?=$location->getname()?></div>
                <div style='padding-bottom:5px; display:block; width:615px; overflow:hidden;'>
                	<div class='location_slide'>
                    	<ul>
                        <?
							$pictures = $location->getAllPictures();
							foreach($pictures as $picture)
							{
						?>
                        	<li><a rel='example_group' href='<?=$picture->getPath()?>'><img src='<?=$picture->getPath("loc_")?>' /></a></li>
                        <?
							}
						?>
                        </ul>
                    </div>
                </div>
                <div>
                	<?=$location->getdescription();?>
                </div>
            </div>
        <?
		}
	}
	else if ($mod == 'booking')
	{
	?>
    	<div class='form_lien_he' style='float:none'>
        	<? include('z_includes/tour_book.php')?>
        </div>
    <?
	}
}
?>

<script>
$(document).ready(function()
{
	$("a[rel=example_group]").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true
	});
	
	$(".location_slide").jcarousel({
		auto: 3,
        scroll: 1,
		wrap: 'circular',
		animation: 500,
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null
    });
});
</script>